package com.ruoyi.electronicFence.domain;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 场所（监测点）状态历史对象 t_ef_history_equipment_status
 *
 * @author sxygsj
 * @date 2024-08-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TEfHistoryEquipmentStatus extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 单位编号 */
    @Excel(name = "单位编号")
    private String unitCode;

    /** 场景编号 */
    @Excel(name = "场景编号")
    private String areaId;

    /** 场景名称 */
    @Excel(name = "场景名称")
    private String areaName;

    /** 场景类型 */
    @Excel(name = "场景类型")
    private String areaType;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String equipmentCode;

    /** 设备类型 */
    @Excel(name = "设备类型")
    private String equipmentType;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String equipmentName;

    /** 监测设备编码 */
    @Excel(name = "监测设备编码")
    private String deviceId;

    /** 监测设备名称 */
    @Excel(name = "监测设备名称")
    private String deviceName;

    /** 监测设备类型 */
    @Excel(name = "监测设备类型")
    private String deviceType;

    /** 设备状态  0-运行 1-停机 2-未接入 */
    @Excel(name = "设备状态  0-运行 1-停机 2-未接入")
    private String equipmentStatus;

    /** 控制器Id */
    @Excel(name = "控制器Id")
    private String controllerId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "数据时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dataTime;

    /**  0-正常 1-预警 2-断电 3-离线 */
    @Excel(name = " 0-正常 1-预警 2-断电 3-离线")
    private String alarmType;

    /** 状态持续时间 秒数 */
    @Excel(name = "状态持续时间 秒数")
    private Integer durationSeconds;

    /** 状态持续时间 */
    @Excel(name = "状态持续时间")
    private String durationSecondsStr;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "状态变更开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime statusStartDatetime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "状态变更结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime statusEndDatetime;


}
